package com.company.common.util;

//ThreadLocal存储user
public class UserThreadLocal {
    private static ThreadLocal<String> stringThread = new ThreadLocal<>();

    public static void set(String string){

        stringThread.set(string);
    }

    public static String get(){

        return stringThread.get();
    }

    //防止内存泄漏
    public static void remove(){

        stringThread.remove();
    }
}
